Repository navigation
Add splitSideBySideCollections option - #1455
Merged
Merged
Conversation
Opt in, through RegisterInContainer or the EfGraphQLService constructor, to AsSplitQuery for a request that selects collections side by side, which multiply each other's rows in a single query. Nested collections do not multiply, so do not trigger it. A resolver that called AsSplitQuery or AsSingleQuery keeps its choice. AsSplitQuery is in Microsoft.EntityFrameworkCore.Relational, which is now referenced. Bump to 36.2.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an opt-in
splitSideBySideCollectionstoRegisterInContainerand theEfGraphQLServiceconstructor, off by default.A resolver cannot know which collections a request will select, so calling
AsSplitQueryper field only fixes the requests already seen. With the option on,ApplyProjectioncounts the collections the request's projection loads side by side, and callsAsSplitQuerywhen there are two or more.AsSplitQueryorAsSingleQuerykeeps its choiceAsSplitQueryis inMicrosoft.EntityFrameworkCore.Relational, which is now referencedTests cover the counting. No integration test runs a query with the option on, since the test model has no entity with two collections side by side.
Documented under configuration. Version bumped to 36.2.0.